/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.evote.monitoreo.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Mendoza
 */
@Entity
@Table(name = "logelector", catalog = "evote", schema = "")
@NamedQueries({
    @NamedQuery(name = "Logelector.findAll", query = "SELECT l FROM Logelector l"),
    @NamedQuery(name = "Logelector.findByIdLogElector", query = "SELECT l FROM Logelector l WHERE l.idLogElector = :idLogElector")})
public class Logelector implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "idLogElector", nullable = false)
    private Integer idLogElector;
    @JoinColumn(name = "Elector_idElector", referencedColumnName = "idElector", nullable = false)
    @ManyToOne(optional = false)
    private Elector electoridElector;
    @JoinColumn(name = "DiccionarioLog_idDiccionarioLog", referencedColumnName = "idDiccionarioLog", nullable = false)
    @ManyToOne(optional = false)
    private Diccionariolog diccionarioLogidDiccionarioLog;

    public Logelector() {
    }

    public Logelector(Integer idLogElector) {
        this.idLogElector = idLogElector;
    }

    public Integer getIdLogElector() {
        return idLogElector;
    }

    public void setIdLogElector(Integer idLogElector) {
        this.idLogElector = idLogElector;
    }

    public Elector getElectoridElector() {
        return electoridElector;
    }

    public void setElectoridElector(Elector electoridElector) {
        this.electoridElector = electoridElector;
    }

    public Diccionariolog getDiccionarioLogidDiccionarioLog() {
        return diccionarioLogidDiccionarioLog;
    }

    public void setDiccionarioLogidDiccionarioLog(Diccionariolog diccionarioLogidDiccionarioLog) {
        this.diccionarioLogidDiccionarioLog = diccionarioLogidDiccionarioLog;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idLogElector != null ? idLogElector.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Logelector)) {
            return false;
        }
        Logelector other = (Logelector) object;
        if ((this.idLogElector == null && other.idLogElector != null) || (this.idLogElector != null && !this.idLogElector.equals(other.idLogElector))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.evote.monitoreo.entity.Logelector[idLogElector=" + idLogElector + "]";
    }

}
